docs: adopt @btravstack/theme npm package (drop jsDelivr pin)#267
Merged
Conversation
Replace the jsDelivr-pinned `custom.css` import with the published `@btravstack/theme` VitePress theme, keeping these docs in visual sync with the landing page and the other btravstack projects through a versioned package instead of a CDN URL pinned to a tag. - docs/.vitepress/theme/index.ts: `export default` the shared theme - remove docs/.vitepress/theme/custom.css (the old jsDelivr @import) - add @btravstack/theme ^1.2.0 to @temporal-contract/docs - exempt @btravstack/theme from the release-age gate (first-party pkg) Verified: vitepress build emits the 1.2.0 tokens (--accent #E0589A, --display-accent #E0589A, --text-accent #D6246F light / #E0589A dark). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the VitePress docs site from a jsDelivr-pinned CSS import to the published @btravstack/theme npm package, aiming for reproducible builds and normal semver-based updates.
Changes:
- Switches the docs theme entrypoint to
export defaultthe shared@btravstack/theme. - Removes the old
custom.cssfile that imported the theme CSS from jsDelivr. - Adds
@btravstack/theme@^1.2.0to the docs workspace and exempts it from pnpm’sminimumReleaseAgegate.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Excludes @btravstack/theme from minimumReleaseAge maturity delay. |
| pnpm-lock.yaml | Locks the newly added @btravstack/theme dependency and updates the resolved graph. |
| docs/package.json | Adds @btravstack/theme to docs devDependencies. |
| docs/.vitepress/theme/index.ts | Replaces local theme wiring with the shared theme package default export. |
| docs/.vitepress/theme/custom.css | Deletes the jsDelivr @import-based stylesheet. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
btravers
commented
Jun 28, 2026
- Fix the failing docs build: `@btravstack/theme` re-exports VitePress's default theme (which imports `.css`); externalizing it during SSR made Node throw `ERR_UNKNOWN_FILE_EXTENSION`. Add `vite.ssr.noExternal` for the theme so Vite transforms it and handles the CSS imports. - Move `@btravstack/theme` into the pnpm `catalog` (exact `1.2.0`) and reference it as `catalog:` in `docs/package.json`, matching how every other third-party dep is pinned. - `pnpm dedupe` to collapse the duplicate `@types/node@24.13.1` peer back onto the catalog-pinned `24.13.2`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the docs site onto the published
@btravstack/theme@^1.2.0package, replacing the old jsDelivrcustom.cssimport that was pinned to a git tag.What changed
docs/.vitepress/theme/index.tsnowexport defaults the shared theme (it extends VitePress's default theme and layers the btravstack design tokens).docs/.vitepress/theme/custom.css(the jsDelivr@import).@btravstack/theme@^1.2.0to@temporal-contract/docs.@btravstack/themefrom theminimumReleaseAgegate (7-day maturity delay) — it's a first-party btravstack package.Why
A versioned npm dependency replaces a CDN URL pinned to a tag: upstream theme/token changes arrive via a normal version bump, builds are reproducible, and there's no CDN cache lag or build-time SHA drift.
Verification
vitepress buildemits the 1.2.0 design tokens —--accent #E0589A,--display-accent #E0589A,--text-accentdarkening to#D6246Fin light /#E0589Ain dark (the WCAG-AA fix).🤖 Generated with Claude Code